var table,$;
layui.use(['table'],function () {
    table = layui.table;
    $ = layui.$;
    initVitaeImgsData();
    $("#search1").click(function () {
        initVitaeImgsData();
    })
    table.on('toolbar(vitaeList)', function(obj){
        // var checkStatus = table.checkStatus(obj.config.id);
        switch(obj.event){
            case 'add':
                layer.msg('添加');
                break;
            case 'delete':
                layer.msg('删除');
                break;
            case 'update':
                layer.msg('编辑');
                break;
        };
    });
})

function initVitaeImgsData() {
    var id = $('#id1').val();
    var vitaeId = $('#vitaeId').val();
    if(id == ""){
        id = 0;
    }
    if(vitaeId == ""){
        vitaeId = 0;
    }
    table.render({
        elem: '#vitaeImgsList'
        , url: '/zpxx/getVitaeImgs'
        , method: 'get'
        , where: {
            id:id,
            vitaeId:vitaeId
        }
        , limit: 10
        , page: true
        ,toolbar: 'default'
        , cols: [[
            {type: 'numbers'}
            , {field: 'id', title: 'ID', width: 80, unresize: true, sort: true}
            , {field: 'vitaeId', title: '简历ID',width: 80,unresize: true,}
            , {field: 'fileId', title: 'fileID'}
            ,{fixed:'right', title:'操作',width:140,align:'center', toolbar:'#optBar'}
        ]]
    })
}



